package com.bajiao.service.recharge.impl;

import com.bajiao.common.constant._Whole;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bajiao.entity.recharge.RechargeMenu;
import com.bajiao.mapper.recharge.RechargeMenuMapper;
import com.bajiao.service.recharge.RechargeMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 充值菜单
 * @Author: FanJq
 * @Date:   2024-03-17
 * @Version: V1.0
 */
@Service
public class RechargeMenuServiceImpl extends ServiceImpl<RechargeMenuMapper, RechargeMenu> implements RechargeMenuService {

    /**
     * @Description
     * 获取充值菜单
     * @date 2024/12/25 10:32
     * @author FanJq
     * @param
     * @return {@link List< RechargeMenu>}
    */
    @Override
    public List<RechargeMenu> getMenuList() {
        List<RechargeMenu> menuList = super.lambdaQuery()
                .eq(RechargeMenu::getDelFlag, _Whole.ZERO)
                .orderByAsc(RechargeMenu::getPrice)
                .orderByAsc(RechargeMenu::getAmount)
                .list();
        return menuList;
    }
}
